package com.yhs.snow.annoation;

public class Car extends  AnnoationConfig{
    @NotNull(message = "名称不能为空")
    String name;
    @NotNull(message = "序列号不能为空")
    Integer id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Car{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }

    public static void main(String[] args) throws Exception {
        Car car  = new Car();
        car.validate();
    }
}
